package com.paomi.client.activity.net;


import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.hannesdorfmann.mosby3.mvp.MvpView;
import com.paomi.client.R;
import com.paomi.client.activity.net.presenter.NetNullPresenter;
import com.paomi.client.base.BaseMvpActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class NetNullActivity extends BaseMvpActivity<MvpView, NetNullPresenter> {


    @BindView(R.id.netnull_img)
    ImageView netnull_img;
    @BindView(R.id.net_btn)
    Button net_btn;

    @Override
    protected void initEvent() {
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_netnull;
    }

    @Override
    protected String setTitle() {
        return null;
    }

    @Override
    protected void showBack(TextView button_goback) {
        button_goback.setVisibility(View.VISIBLE);
        button_goback.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
        button_goback.setTextColor(getResources().getColor(R.color.main_color));
        button_goback.setText(getResources().getString(R.string.back_normal) + getResources().getString(R.string.back));
        button_goback.setTypeface(iconfont);

    }

    @NonNull
    @Override
    public NetNullPresenter createPresenter() {
        return new NetNullPresenter();
    }

    @OnClick({R.id.netnull_img, R.id.net_tv, R.id.net_btn})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.netnull_img:
                finish();
                break;
            case R.id.net_tv:
                finish();
                break;
            case R.id.net_btn:
                finish();
                break;
        }
    }
}
